@extends('frontend/layouts/bootstrap')

@section('content')
<h1>Машин зардлын мэдээлэл бүртгэх</h1>

{{ Form::open(array('route' => array('car_balance.car.expense', $purchase_car->id))) }}

<div class="well well-small">
    <b>Car:</b> {{ $purchase_car->car_maker }} {{ $purchase_car->car_name }} ({{ $purchase_car->car_year}}), <b>Chassis number:</b> {{ $purchase_car->chasis_no }}
</div>

<table class="table table-bordered">
    <thead style="background-color: #f0f0f0;">
        <th title="Purchase price">購入額</th>
        <th title="VAT (%)">消費税 (%)</th>
        <th title="Recycle Amount">リサイクル</th>
        <th title="Auction commission">落札料</th>
        <th title="Car tax amount">自動車税</th>
        <th title="Land transportation">陸送</th>
        <th title="Others">その他</th>
        <th title="Vanning">バンニング</th>
    </thead>

    <tr>
        @include('nimo.domains.car_balance.Main._form_field', array('field'=>'purchase_price', 'value' => $purchase_car->purchase_price))
        <td>
            <select name="vat_percent" id="vat_percent" class="input-small">
                <option value="5" {{ $purchase_car->vat_percent == '5' ? 'selected' : '' }}>5 %</option>
                <option value="8" {{ $purchase_car->vat_percent == '8' ? 'selected' : '' }}>8 %</option>
                <option value="0" {{ $purchase_car->vat_percent == '0' ? 'selected' : '' }}>0 %</option>
            </select>
        </td>
        @include('nimo.domains.car_balance.Main._form_field', array('field'=>'recycle_amount', 'value' => $purchase_car->recycle_amount))
        @include('nimo.domains.car_balance.Main._form_field', array('field'=>'auction_commission', 'value' => $purchase_car->auction_commission))
        @include('nimo.domains.car_balance.Main._form_field', array('field'=>'car_tax_amount', 'value' => $purchase_car->car_tax_amount))
        @include('nimo.domains.car_balance.Main._form_field', array('field'=>'transfer_fee', 'value' => $purchase_car->transfer_fee, 'title' => 'Transport fee'))
        @include('nimo.domains.car_balance.Main._form_field', array('field'=>'others', 'value' => $purchase_car->others))
        @include('nimo.domains.car_balance.Main._form_field', array('field'=>'vanning', 'value' => $purchase_car->vanning))
    </tr>
</table>

<button type="reset" class="btn btn-large btn-default">Reset</button>
<button type="submit" class="btn btn-large btn-success"><i class="icon-plus icon-white"></i> Бүртгэх</button> &nbsp;&nbsp;

{{ Form::close() }}
@stop


@section('pagescripts')
<!--page specific plugin scripts-->
<script type="text/javascript" >
    $(document).ready(function(){
    });
</script>
@stop